package com.big.order.listener;

import com.big.model.vo.sms.PaySmsVo;
import com.big.order.config.RabbitConfig;
import com.big.sms.SmsFeignClient;
import com.rabbitmq.client.Channel;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class MySmsListener   {

    @Autowired
    SmsFeignClient smsFeignClient;

    @RabbitListener(queues = RabbitConfig.QUEUE_MSM_ITEM)
    public void onMessage(PaySmsVo paySms, Channel channel) throws Exception {
        System.out.println(paySms);
        //发送短信
//        smsFeignClient.PaySend(paySms);
    }

}
